const path = require('path');
const RunPlugin = require("./plugins/RunPlugin");
const DonePlugin = require("./plugins/DonePlugin");
// console.log(process.env.NODE_ENV)
module.exports = {
  mode: 'development',
   context: process.cwd(),
  devtool:false,
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "main.js",
  },
  module: {
    rules: [
      { test: /\.css$/, use: ['style-loader','css-loader', 'postcss-loader',
          {
            loader: 'px2rem-loader',
            options: {
              remUnit: 75,
              remPrecision: 8
            }
          }
      ]},
      { test: /\.less$/, use: ['style-loader','css-loader', 'postcss-loader', 'less-loader'] }
    ]
  },
  plugins: [new RunPlugin(),new DonePlugin()],
  devServer: {},
};
